package com.atguigu.yygh.cmn;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;
import java.util.List;

public class EseyEX {

    public static void main(String[] args) {

        List<UserData> list = new ArrayList<>();

        for (int i = 0; i <10 ; i++) {
            UserData userData = new UserData();
            userData.setId(i);
            userData.setName("用户"+i);
            list.add(userData);
        }

        String fielname="F:\\file\\01.xlsx";

        EasyExcel.write(fielname,UserData.class).sheet("用户信息")
                .doWrite(list);


    }
}
